package com.qh.yyxt.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qh.yyxt.entity.Borrow;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class BorrowPartDTO
{
    //记录id
    private Integer id;
    //用户id
    private Integer uid;
    //会议室id
    private Integer mid;
    //会议室名称
    private String midName;
    //会议名称
    private String name;
    //活动方是那个学院的？
    private String uName;
    //开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date starttime;
    //结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endtime;
    //申请提交时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date time;
    //状态:待审批、审批通过、已撤销、会议结束、未通过
    private String state;
    //延时申请信息
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date delaytime;
    //申请延时的状态
    private String delaystate;
    public void set(Borrow b)
    {
        if (b != null)
        {
            id = b.getId();
            uid = b.getUid();
            mid = b.getMid();
            name = b.getName();
            starttime = b.getStarttime();
            endtime = b.getEndtime();
            time = b.getTime();
            state = b.getState();
        }
    }
}
